<?
  require_once("connection.php");
  error_reporting(0);

  $id = $_POST["id"];
  $query = "delete from g_staff_course where course_id=".$id.";";
  $result = @mysql_query($query);
  $query = "delete from g_courses where course_id=".$id.";";
  $result = @mysql_query($query);

  if(empty($result)){
      echo "<pre>The record has not been DELETED!!!</pre>";
  }
  else{
      echo "<pre>The record has been successfully DELETED</pre>";
  }
  $query = "delete from g_lectures where course_id=".$id.";";
  $result = @mysql_query($query);
  $query = "delete from g_exercises where course_id=".$id.";";
  $result = @mysql_query($query);

  require_once("display_courses.php");
?>
